<?php  
use \app\common\services\ConstantMapService;
use \app\common\services\UrlService;
use \app\common\services\StaticService;
StaticService::includeAppJsStatic( "/js/m/product/quxiao.js",\app\assets\MAsset::className() );
?>
<div style="min-height: 500px;">
	<div class="page_title clearfix">
    <span>订单列表</span>
</div>

<div class="order_box mg-t20">
<?php foreach($list as $v):?>
	<div class="order_header">
		<h2>订单编号: <?=$v['order_sn']?></h2>
		<p>下单时间：<?= date('y-m-d H:i:s',$v['created_time'])?>状态：<?=ConstantMapService::$pay_status_mapping[$v['status']]?></p>

		<p>快递信息:<?=!empty($v['express_info'])?$v['express_info']:"暂无快递信息"?></p>
		<span class="up_icon"></span>
	</div>
	<ul class="order_list">
        		<li>
			<a href="javascript:void(0);">
				<i class="pic">
                    <img src="<?=UrlService::buildPicUrl('book',$v['main_image'])?>"  style="width: 100px;height: 100px;"/>
                </i>
				<h2><?=$v['name']?> </h2>
				<h3>&nbsp;</h3>
				<h4>&nbsp;</h4>
				<b>¥ <?=$v['price']?></b>
			</a>
            		
            		</li>
			</ul>
	        <div class="op_box border-top">
	        <?php if($v['status']==0 || $v['status']==-8){?>
            <a style="display: inline-block;" class="button quxiao"  href="javascript:void(0)" data="<?=$v['pay_order_id']?>" quantity="<?=$v['quantity']?>" book_id="<?=$v['target_id']?>">取消订单</a>
            <a style="display: inline-block;" class="button"  href="<?=UrlService::buildMUrl('/pay/buy',['pay_order_id'=>$v['pay_order_id']])?>">微信支付</a>
           	<?php }else if($v['status']==1){?>
           		<a style="display: inline-block;" class="button"  href="<?=UrlService::buildMUrl('/user/comment_set',['pay_order_id'=>$v['pay_order_id']])?>">我要评论</a>
           	<?php }?>
        </div>
	</div>
	<?php endforeach;?>
</div>

